<template>
  <div class="main">
    <el-menu
        class="el-menu-demo"
        mode="horizontal"
        router
        active-text-color='#1e90ff'
        default-active='/recommend'
    >
        <el-menu-item v-for="(v,i) in routers" :key="i" :index='v.path' >{{v.name}}</el-menu-item>
    </el-menu>
    <router-view></router-view>
</div>
</template>

<script>
import headRouter from "../router/headRouter"
export default {
    data(){
        return{
            routers:headRouter
        }
    },
};
</script>

<style lang='scss'>
    .main{
        width: 100%;
    }
</style>